Save work on emitting ignored diagnostics pt 2#20696
Conversation
This should be another 2.5% on self check
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
JukkaL
left a comment
There was a problem hiding this comment.
Nice, I guess this helps with third-party libraries a lot.
|
This change causes a few regressions for Home Assistant. As an example, one can be narrowed down to # pip install voluptuous==0.16.0
import voluptuous as vol
def f(ex: vol.MultipleInvalid):
reveal_type(ex.errors)This should be inferred as The classes are basically defined as: class Invalid(Exception): ...
class MultipleInvalid(Invalid):
def __init__(self, errors: list[Invalid] | None = None) -> None:
self.errors = errors[:] if errors else []However, with that -- |
|
Ah, I see the issue. This is why I had the "pure" renames in the first PR. I'll revert and think about if there's a good way to be systematic about this. Thanks for bringing it up! |
This reverts commit 195ab98.
This should be another 2.5% on self check
Sequel to #20621